#try【引发异常】  except【发生异常】 else【没有异常则执行】  finaly【总会执行】  raise [抛出异常]

a =0
try:
    c=23/a
except ZeroDivisionError as e:
    print(e)
else:
    print("ok")
finally:
    print("都会执行")



try:
    d=45/a
except ZeroDivisionError as e:
    print(e)
except ValueError as v:
    print(v)
finally:
    print('www')


class Myexe(Exception):
    print('自定义异常')
    pass


try:
    d=21/a
    raise Myexe("异常了")
finally:
    print('结束')
